<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./WEB-INF/template.xhtml">

            <ui:define name="pageTitle">
                Register exemplar
            </ui:define>

            <ui:define name="content">
                <f:view>
                    <h:form>
                        <h1><h:outputText value="Create/Edit"/></h1>
                        <h:panelGrid columns="3">
                            <h:outputLabel value="Barcode:" for="barcode" />
                            <h:inputText id="barcode" value="#{exemplarBean.e.barcode}" title="Barcode" required="true"
                                         requiredMessage="The Barcode field is required."/>
                            <h:message for="barcode"/>
                        </h:panelGrid>
                        <h:commandButton
                            action="#{redirect.to('books.xhtml')}"
                            actionListener="#{exemplarBean.create()}"
                            value="Register">
                            <f:param name="bid" value="#{param.bid}"/>
                        </h:commandButton>
                    </h:form>
                </f:view>

            </ui:define>

        </ui:composition>

    </body>
</html>
